package com.dd.common.dto.system.file;

import com.dd.common.pojo.dto.TimeDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import java.io.Serializable;

@Schema(description = "查询文件DTO")
@Data
public class SysFileQueryDTO extends TimeDTO implements Serializable {
    @Schema(description = "文件名", example = "logo.png")
    private String fileName;
    @Schema(description = "文件媒体类型", example = "image/png")
    private String mimeType;
    @Schema(description = "文件路径", example = "upload/2023/01/01/logo.png")
    private String filePath;

    @Schema(description = "业务ID（如文章ID）", example = "1")
    @Min(value = 1, message = "业务ID必须大于0")
    private Long bizId;
    @Schema(description = "上传用户ID", example = "1")
    @Min(value = 1, message = "上传用户ID必须大于0")
    private Long uploadUserId;
    @Schema(description = "文件类型（1-图片，2-视频，3-音频，4-文档，5-其他）", example = "1")
    @Range(min = 1, max = 5, message = "文件类型必须在1-5之间")
    private Integer type;

}
